package com.myapp.imp.war.msg;

import java.io.IOException;

import com.myapp.imp.war.logical.CGDoMagicLogical;
import com.myapp.msg.ann.MsgDefine;
import com.myapp.msg.base.BaseMsg;
import com.myapp.msg.type.MsgPermission;


/**
 * 文件名：CGDoMagicMsg.java
 * <p>
 * 功能：释放魔法
 * <p>
 * 版本：1.0.0
 * <p>
 * 作者：Builderd by AppTools
 * <p>
 */
@MsgDefine(id = 10307, name = "CGDoMagic", permission = MsgPermission.AUTHORIZE, logicalClass = CGDoMagicLogical.class)
public class CGDoMagicMsg extends BaseMsg {

	public CGDoMagicMsg(){
	}

	//魔法id
	private int magicId = 0;
			
	//魔法id的get方法
	public int getMagicId() {
		return magicId;
	}

	//魔法id的set方法
	public void setMagicId(int magicId) {
		this.magicId = magicId;
	}
	
	@Override
	public void read() throws IOException {
		//读取Field
		//读取魔法id
		this.setMagicId(this.readInt());
		
		//读取Bean
	}
	
	@Override
	public void write() throws IOException {
		//写入魔法id
		this.writeInt(this.getMagicId());
		
	}
}
